package com.cy.sys.controller;

import com.cy.sys.common.pojo.JsonResult;
import com.cy.sys.common.until.PageUtil;
import com.cy.sys.pojo.Bill;
import com.cy.sys.service.BillService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/bill/")
@CrossOrigin
public class BillController {

    @Autowired
    private BillService billService;

    @GetMapping
    @ApiOperation(value = "账单条件查询", notes = "接受账单信息")
    public JsonResult doFinBills(Bill entity){
        return new JsonResult(PageUtil.startPage().doSelectPageInfo(()->{
            billService.findBills(entity);
        }));
    }
}
